package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

@Data
public class CategoryUpdateInfoParam {
    @NotNull(message = "必须提交分类名称")
    @ApiModelProperty(value = "分类名称", required = true, example = "XXX的分类")
    private String name;

    @NotNull(message = "必须提交分类关键字")
    @ApiModelProperty(value = "分类关键字", required = true, example = "XXX的分类关键字")
    private String keywords;

    @NotNull(message = "添加分类失败，必须提交排序序号！")
    @Range(max = 99, message = "添加分类失败，排序序号值必须0~99之间！")
    @ApiModelProperty(value = "排序序号,1~255之间数字", required = true, example = "90")
    private Integer sort;

    @NotNull(message = "必须提交分类图标")
    @ApiModelProperty(value = "分类图标", required = true, example = "XXX的分类图标")
    private String icon;
}
